<?php

header("Content-Type: text/html;charset=utf8");

class TikuDb {

    private $mysql;
    private $mongo;
    private $inMongo;

    public function __construct() {
        
    }

    private function initMysql() {
        $this->mysql = new InMysql();
    }

    private function initMongo() {
        $this->inMongo = new InMongo();
        $this->mongo = $this->inMongo->getMongoDb();
    }

    public function updateTiku($data) {
        $this->initMongo();
        $collection = $this->mongo->timu;
        $collection->remove(array());
        return $collection->batchInsert($data);
    }

}
